// Element Plus 样式覆盖

// Menu
.el-menu {
  border-right: none !important;
  
  .el-menu-item, .el-sub-menu__title {
    height: 50px;
    line-height: 50px;
    
    &:hover {
      background-color: rgba(255, 255, 255, 0.1) !important;
    }
    
    &.is-active {
      background-color: $primary-color !important;
      color: #fff !important;
    }
  }
}

// Card
.el-card {
  border: none;
  border-radius: $border-radius-base;
  box-shadow: $box-shadow-light !important;
  
  .el-card__header {
    padding: 15px 20px;
    border-bottom: 1px solid $border-color-light;
  }
}

// Button
.el-button {
  &--primary {
    --el-button-hover-bg-color: darken($primary-color, 10%);
    --el-button-active-bg-color: darken($primary-color, 20%);
  }
  
  &--success {
    --el-button-hover-bg-color: darken($success-color, 10%);
    --el-button-active-bg-color: darken($success-color, 20%);
  }
  
  &--warning {
    --el-button-hover-bg-color: darken($warning-color, 10%);
    --el-button-active-bg-color: darken($warning-color, 20%);
  }
  
  &--danger {
    --el-button-hover-bg-color: darken($danger-color, 10%);
    --el-button-active-bg-color: darken($danger-color, 20%);
  }
}

// Form
.el-form {
  .el-form-item {
    margin-bottom: 20px;
    
    &__label {
      font-weight: normal;
    }
  }
}

// Input
.el-input {
  .el-input__wrapper {
    box-shadow: 0 0 0 1px $border-color-base inset;
    
    &:hover {
      box-shadow: 0 0 0 1px $border-color-light inset;
    }
    
    &.is-focus {
      box-shadow: 0 0 0 1px $primary-color inset !important;
    }
  }
}

// Table
.el-table {
  --el-table-border-color: $border-color-lighter;
  --el-table-header-bg-color: $background-color-base;
  
  th {
    font-weight: 600;
    color: $primary-text-color;
    background-color: $background-color-base;
  }
  
  td {
    color: $regular-text-color;
  }
}

// Pagination
.el-pagination {
  margin-top: 20px;
  justify-content: flex-end;
  
  .el-pagination__total {
    margin-right: 16px;
  }
}

// Dialog
.el-dialog {
  border-radius: $border-radius-base;
  
  &__header {
    margin: 0;
    padding: 20px;
    border-bottom: 1px solid $border-color-light;
  }
  
  &__footer {
    margin: 0;
    padding: 20px;
    border-top: 1px solid $border-color-light;
  }
}

// Message
.el-message {
  min-width: 300px;
  padding: 15px 20px;
  border-width: 0;
  border-radius: $border-radius-base;
  box-shadow: $box-shadow-light;
  
  &--success {
    background-color: lighten($success-color, 45%);
    border-color: lighten($success-color, 35%);
  }
  
  &--warning {
    background-color: lighten($warning-color, 45%);
    border-color: lighten($warning-color, 35%);
  }
  
  &--error {
    background-color: lighten($danger-color, 45%);
    border-color: lighten($danger-color, 35%);
  }
} 